package com.pkk.penguin.frame.know.java.interview.parampassing;

import org.junit.Test;

/**
 * @description: Integer的缓冲池的测试
 * @author: peikunkun
 * @create: 2020-01-03 11:37
 **/
public class IntegerCacheTests {

  @Test
  public void Administrator_12_20200103113756() {
    System.out.println("欢迎使用单元测试方法【Administrator_12()_20200103113756】");
    System.out.println("此方法测试描述：【IntergerCache的缓存的使用】");
    Integer i_10_temp1 = Integer.valueOf(10);
    Integer i_10_temp2 = Integer.valueOf(10);
    Integer i_100_temp1 = Integer.valueOf(100);
    Integer i_100_temp2 = Integer.valueOf(100);
    Integer i_127_temp1 = Integer.valueOf(127);
    Integer i_127_temp2 = Integer.valueOf(127);
    Integer i_128_temp1 = Integer.valueOf(128);
    Integer i_128_temp2 = Integer.valueOf(128);
    Integer i_lose_128_temp1 = Integer.valueOf(-128);
    Integer i_lose_128_temp2 = Integer.valueOf(-128);
    Integer i_lose_129_temp1 = Integer.valueOf(-129);
    Integer i_lose_129_temp2 = Integer.valueOf(-129);
    System.out.println("10:" + (i_10_temp1 == i_10_temp2));
    System.out.println("100:" + (i_100_temp1 == i_100_temp2));
    System.out.println("127:" + (i_127_temp1 == i_127_temp2));
    System.out.println("128:" + (i_128_temp1 == i_128_temp2));
    System.out.println("-128:" + (i_lose_128_temp1 == i_lose_128_temp2));
    System.out.println("-129:" + (i_lose_129_temp1 == i_lose_129_temp2));

  }
}
